#!/usr/bin/env python
#-*- coding: UTF-8 -*-

# name = 'name1'
# jzrq = 'jzrq'
# dwjz = 'dwjz'
# gsz = 'gsz'
# gszzl = 'gszzl'
# gztime = 'gztime'

# result = {}
# # result['jj_code'] = code
# result[name] = name
# result['ly'] = 'tt'
# result['riqi'] = gztime
# result['dwjz'] = gsz
# result['zdf'] = gszzl
# print(result)

import xlrd
import os

# r = ReadExcel('cases.xlsx','Sheet1')

os.chdir(os.path.abspath(os.path.dirname(__file__)))

file_name = '业务单元列表打印模板.xls'

# 读取数据
# 打开文件
execl = xlrd.open_workbook(file_name)
# 查看工作表
sheet_names = execl.sheet_names()
print(sheet_names)

db = execl.sheet_by_name(sheet_names[0])
print(db)

dict = {}
for rowNum in range(db.nrows):
    rowVale = db.row_values(rowNum)
    print(rowVale)
#     k = rowVale[6]
#     v = rowVale[0]
#     dict[k] = v
# print(dict)
